﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University
{
    class Student
    {
        private string name;
        private int fn;

        public Student(string name, int fn)
        {
            this.Name = name;
            this.FN = fn;
        }

        public string Name 
        {
            get
            {
                return this.name;
            }
            set
            {
                if (value == null)
                {
                    throw new ArgumentNullException("Name can not be null!");
                }
                this.name = value;
            }
        }

        public int FN 
        {
            get
            {
                return this.fn;
            }
            set
            {
                if (value < 10000 || value > 99999)
                {
                    throw new ArgumentOutOfRangeException("The FN must be between 10000 and 99999!");
                }
                this.fn = value;
            }
        }
    }
}
